<?php
define('MODX_MANAGER_PATH', '../../../manager/');//relative path for manager folder
include MODX_MANAGER_PATH.'includes/config.inc.php';

// Setup the MODx API
define('MODX_API_MODE', true);
// initiate a new document parser
include_once(MODX_MANAGER_PATH.'/includes/document.parser.class.inc.php');

$modx = new DocumentParser;

//key to atually connect to the db:
$modx->db->connect(); // provide the MODx DBAPI
$modx->getSettings(); // provide the $modx->documentMap and user settings

?>